home *** CD-ROM | disk | FTP | other *** search
- Path: news.iadfw.net!usenet
- From: Mark Nelson <markn@airmail.net>
- Newsgroups: comp.lang.c
- Subject: Re: RS232 & Strings
- Date: Wed, 27 Mar 1996 08:41:47 -0600
- Organization: customer of Internet America
- Message-ID: <315953AB.47C1@airmail.net>
- References: <Pine.SUN.3.91.960326144705.10920A-100000@Ra.MsState.Edu>
- NNTP-Posting-Host: dal12-22.ppp.iadfw.net
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (Win95; I)
-
- > I need to be able to receive a string that is ten
- > char. long (starting w/ a + or - and ending with a <CR> ) from an
- > external device that is hooked to a PC RS232 port. I have gotten the
- > port initialized, etc. can receive some data from it, but I need to be
- > able to receive a string from the device. Using inport and casting
-
- You are going to need an interrupt driven routine to receive characters.
- Trying to read them in using polling is not going to work, because
- you are inevitably going to miss some characters.
-
- One solution is to switch to a Windows app, because you can use
- the Windows serial driver.
-
- If you don't want to switch, you can use code from an article I have
- posted on my home page. Follow the links to "Articles." If you want
- more information, you can check into my book on serial communications.
- Info on the book is also on my home page.
-
- Mark Nelson
- http://web2.airmail.net/markn
-